﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace Koeltp.DataAccess
{
    /// <summary>
    ///IDataAccess 的摘要说明
    /// </summary>
    public interface IDataAccess
    {
        //void Open();//打开数据库
        //void Close();//关闭数据库
        //void BeginTran();//开始事务
        //void CommitTran();//提交事务
        //void RollBackTran();//回滚事务

        int ExecuteNonQuery(string sql,CommandType command, params QueryParameter[] parameters);//增删改
        object GetScalar(string sql,CommandType commandType, params QueryParameter[] parameters); //查询单值
        DataTable GetTable(string sql, DataTable dt,CommandType commandType, params QueryParameter[] parameters);//返回查询结果表格
        IDataReader GetReader(string sql,CommandType commandType, params QueryParameter[] parameters);//返回一个DataReader
        string DeleteTran(string sql, params QueryParameter[] commandParameters);
        DataSet ArticleListPaging(string sql, QueryParameter[] paras);
    }
}